Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R pkgdown support #1208

Closed
wants to merge 7 commits into from
Closed

R pkgdown support #1208

wants to merge 7 commits into from

Conversation

Laurae2
Copy link
Contributor

@Laurae2 Laurae2 commented Jan 21, 2018

This pull request is to add R pkgdown support to the LightGBM R-package.

Fixes #1143

Warning: huge pull request. It affects only the LightGBM R documentation and not how it works. I will regenerate the documentation on a regular basis when I have time.

To not merge yet.

Request vignettes you want to see. I'm out of ideas currently.

It involves refactoring all demos to vignettes and creating the appropriate .yml file for pkgdown. I included the original .yml file for the website and the script used to:

  • Load libraries (devtools, roxygen2, pkgdown)
  • Set the working directory
  • Check the LightGBM R-package using identical CRAN checks for Windows using your R locally
  • Build the LightGBM R-package website using pkgdown
  • Install the LightGBM R-package locally

I used my own pkgdown because the original pkgdown refuses to show everyone in the field Authors@R.

It still requires the following:

  • Find hosting for the pkgdown documentation (I'll host it, max number of simultaneous users basically infinite thanks to static site hosted on CDNs)
  • Add badges to R README.md
  • Change a bit the README.md documentation
  • Add Authors@R field in DESCRIPTION (@guolinke (aut+cre) + @Laurae2 (ctb) + @yanyachen (ctb) )
  • Fix Author field in DESCRIPTION
  • Move Matrix and methods to Depends instead of Imports (fixes many instances of example crashes)
  • Fix all instances of crashes in function examples
  • Update date of DESCRIPTION
  • Regenerate the whole documentation from scratch
  • Run successfully pkgdown::build_site() on the R-package folder without vignettes
  • Convert demos to vignettes
  • Find workarounds for all function examples which crashes and cannot have a direct or immediate workaround
  • Fix all instances of crashes in vignettes
  • Find workarounds for all vignettes which crashes and cannot have a direct or immediate workaround
  • Run successfully pkgdown::build_site() on the R-package folder with vignettes
  • Add to my hosting (I still did not do it yet)
  • Add links to host (to-do)
  • Make sure the website is fully functional in the host and not only locally (to-do)

Bonus and nice to have:

  • Add R function to load the website locally when the package is installed
  • Vignette refactoring
  • More vignettes
  • More real world data for new vignettes
  • Add R function for auto-benchmarking LightGBM on local machine

Example pictures:

image

image

image

@Laurae2 Laurae2 requested a review from guolinke January 21, 2018 15:11
@Laurae2
Copy link
Contributor Author

Laurae2 commented Jan 22, 2018

@guolinke You can see how the LightGBM R-package documentation looks like here: https://htmlpreview.github.io/?https://github.com/Laurae2/LightGBM/blob/pkgdown/R-package/docs/index.html

@@ -625,6 +625,9 @@ Booster <- R6Class(
#'
#' @examples
#' \dontrun{
#' # It crashes the documentation generation, skipping
#' if (!(pkgdown::in_pkgdown())) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these crash ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is because I used the version without ffeae5a

I can now remove the crash workarounds with your fix.

@Laurae2
Copy link
Contributor Author

Laurae2 commented Jan 30, 2018

@guolinke I think we can do the 8 missing steps in another PR. (can merge this one)

@Laurae2
Copy link
Contributor Author

Laurae2 commented Mar 14, 2018

Waiting for #1260 to pass first then going to redo this PR from scratch + put the doc in docs folder instead of the R folder.

@Laurae2 Laurae2 closed this Mar 14, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[R-package] Add pkgdown documentation support
2 participants